#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <iostream>
#include <istream>
using ll = int64_t;
#define sl static inline
ll n,k,m;

sl bool check(ll x){
    ll g=0;
    for(ll i=1;i<=k;i++){
        ll y=(n-g)/x;
        if(y<m){
            g+=m*(k-i+1);
            return g>=n;
        }else{
            ll nxt = ((n-g)-(y*x))/y+1;
            nxt=std::min(nxt,k-i+1);
            g+=y*nxt;
            i+=nxt-1;
        }
    }
    return g>=n;
}

int main(){
    std::iostream::sync_with_stdio(false);
    std::cin.tie(nullptr);

    std::cin>>n>>k>>m;
    ll l=1,r=n,ans=0,mid;
    while(l<r){
        mid=(l+r)/2;
        // printf("l=%lld, mid=%lld, r=%lld\n",l,mid,r);
        if(check(mid)){
            ans=mid;
            l=mid+1;
        }else{
            r=mid;
        }
    }
    std::cout<<ans<<"\n";
}